﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<JLL.China.Web.Areas.Portal.Models.BannerModel>" %>

<div class="image_area" id="mediaphoto_content">
                    <b>Dynamic Side Content</b>
                    <div class="list">
                        <% if (this.Model.Banners.Count > 0)
                           {%>
                        <ul id="list1">
                            <%
                                string ImagePath = Url.Content("~/") + "Media/Banner/SideContent/";

                                foreach (var item in this.Model.Banners)
                                {
                            %>
                            <li data-itemid='<%= item.Banner_ID %>'>
                                <div>
                                    <span><b> 
                                        <%= item.Title %></b></span>
                                </div>
                                <div>
                                    <% 
                                        if (string.IsNullOrEmpty(item.BannerUrl))
                                        {
                                    %>
                                    <img class="img_photo" src="<%= Url.Content("~/") %>Content/images/no_img_default.png" />
                                    <% }
                                   else
                                   {%>
                                    <img class="img_photo" src="<%= Url.Content("~/") %>Media/Banner/Home/<%=item.BannerUrl %>"
                                        alt="<%=item.Title %>" />
                                    <% } %>
                                </div>
                                <div class="tools">
                                    <div class="t-left">
                                        &nbsp;</div>
                                    <div class="t-center">
                                        <a class="statuslink info-tooltip" href="<%=Url.Content("~/")+ViewData["now_controller"]%>Create/<%=item.Banner_ID%>"
                                            title="Edit">
                                            <img src="<%=Url.Content("~/Content/")%>images/File_edit.png" name="" /></a>
                                        <a class="removelink remove-btn info-tooltip" href="<%=Url.Content("~/")+ViewData["now_controller"]%>Delete/<%=item.Banner_ID%>"
                                            title="Delete">
                                            <img src="<%=Url.Content("~/Content/")%>images/icon_delete.png" /></a> <a class="fancybox-button info-tooltip"
                                                rel="fancybox-button" href="<%=ImagePath+item.BannerUrl%>" title="Zoom this image">
                                                <img src="<%=Url.Content("~/Content/")%>images/icon-zoom.png" /></a>
                                    </div>
                                    <div class="t-right">
                                        &nbsp;</div>
                                </div>
                            </li>
                            <%}     
                            %>
                        </ul>
                        <%}
                           else
                           { %>
                        <br />
                        <br />
                        <h4 style='color: #92B22C;'>
                            No banners at the moment</h4>
                        <%} %>
                        <br style="clear: both;" />
                    </div>
                    <!--#list-->
                </div>